package com.le.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.le.bean.Reply;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface ReplyDao extends BaseMapper<Reply> {

    @Select("select replyid, title, content, publishtime, modifytime, \n" +
            "tbl_reply.uid as uid, tbl_reply.topicid as topicid, \n" +
            "uname, head, regtime\n" +
            "from tbl_reply, tbl_user\n" +
            "where tbl_reply.uid = tbl_user.uid\n" +
            "and topicid = #{topicid}\n" +
            "limit #{start},#{pagesize}")
    public List<Reply> findByPage(int start, int pagesize, int topicid);
}
